import { createApp } from 'vue'
import { setupStore } from '@/store'

import App from './App.vue'
import router from './router'

import '@/permission'

// global css
import '@/styles/index.scss'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/theme-chalk/src/message.scss'

// 引入svg
import 'virtual:svg-icons-register'

const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(router)
setupStore(app)

app.mount('#app')
